export default {
  props: {
    to: {
      type: String,
      require: true,
    },
    tag: {
      type: String,
      require: false,
    },
  },
  render() {
    let tag = this.tag || "a";
    let handler = () => {
      this.$router.push(this.to);
    };
    return <tag onClick={handler}>{this.$slots.default}</tag>; //jsx
  },
};
